<div class="wrap">
<table width="100%" height="100%" cellpadding="0" cellspacing="0">
	<tr>
	<td width="54px" height="43px" class="fr_lefttop"></td>
	<td height="43px" class="fr_centertop" ></td>
	<td width="48px" height="43px" class="fr_righttop"></td>
	</tr>
	<tr>
	<td width="54px" class="fr_leftmiddle" >&nbsp;</td>
	<td class="fr_centermiddle">
{if $smarty.cookies.message == null}
	<div id="ajaxResponse1" class="ajaxResponse"></div>
{else}
	<div id="ajaxResponse1" class="ajaxResponse fade" style="display:block">{if $smarty.cookies.message != NULL}{$smarty.cookies.message}{/if}</div>
{/if}
<h2>{t}News{/t}</h2>
	<p>
		<a href="?mod={$smarty.get.mod}&sub1=news&act=addnews">
				<b>{t escape=no}Create News &raquo;{/t}</b></a>
	</p>
	<table class="widefat">
		<thead>
		<tr>
			<th scope="col" width="50px" style="text-align: center">{t}ID{/t}</th>
	        <th scope="col" width="120px" style="text-align: center">{t}Image{/t}</th>
	        <th scope="col" width="200px">{t}News title{/t}</th>
	        <th colspan="2" style="text-align: center">{t}Action{/t}</th>
		</tr>
		</thead>
		<tbody id="newstable">
			{foreach name=product from=$ALLNEWS.data item=item}
				<tr id="news-{$item->news_id}" class="{cycle values=,alternate}">
					<th scope='row' style='text-align: center'>{$item->news_id}</th>
					<td style="text-align: center"><img src="{$ALLNEWS.PATH}{$item->news_image}" alt="" border="0" /></td>
					<td>{$item->news_title}</td>
					<td style="text-align: center">
                    	<a href="?mod={$smarty.get.mod}&sub1=news&act=editnews&id={$item->news_id}" 
							class='edit'>{t}Edit{/t}
                        </a>
                    </td>
					<td style="text-align: center">
                    	<a onclick="onDeleteNews('?mod={$smarty.get.mod}&sub1=news', '{$item->news_id}', '{$item->news_image}', 'ajaxResponse1')" 
							class='delete'>{t}Delete{/t}
                   		</a>
                    </td>
				</tr>
			{/foreach}
		</tbody>
	</table>
	  {if $ALLNEWS.TOTALPAGE > '0' }
    <div>			
             		
              <div style="text-align:right; float:right" >{$ALLNEWS.FIRST} {$ALLNEWS.PRE}&nbsp;{$ALLNEWS.LISTPAGE}  {if $smarty.session.LC_ALL eq "en"}Pages{else}Trang{/if} &nbsp; {$ALLNEWS.TOTALPAGE} &nbsp;                   
                  &nbsp;{$ALLNEWS.NEXT} {$ALLNEWS.LAST}         
              </div>
              <div style="clear:both"></div>		
    </div>	     
    {/if}
	</td>
	<td width="48px" class="fr_rightmiddle"></td>
	</tr>
	<tr>
	<td width="54px" height="60px" class="fr_leftbot" ></td>
	<td height="60px" class="fr_centerbot"></td>
	<td width="48px" height="60px" class="fr_rightbot" ></td>
	</tr>
</table>
</div>